package com.yvon.service.demo.netty.nio.socket;

import java.io.IOException;
import java.net.Socket;

/**
 * @author : Yvon
 * @since : 2022-06-17
 */
public class ClientSocketTest {
    public static void main(String[] args) {
        try (Socket socket = new Socket("localhost", 8080)) {
            System.out.println(socket);
            socket.getOutputStream().write("world hello 你好时间，勇士总冠军".getBytes());
            System.in.read();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
